#!/usr/bin/env python
"""
Acorn-SDR ('A Collection of Radio Nodes')
(c) Bob Cowdery (G3UKB) 2008

File: profiles.py
Date: April 2009

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

The author can be reached by email at

bob@g3ukb.co.uk

================================================================================
Module Description:

Each profile represents a different configuration. The profile data is the default
data for that profile. Note, only include options that are valid for the profile.
Any option not present will be disabled in the interface.

"""

#-------------------------------------------------------------------------------
# System imports

# Profile data set
profiles = {
    'Dashboard':
    {
        'version' : 0,
        'type' : 'dashboard',
        'description': 'Essential stuff for the dashboard.',
        'path.glade': '/home/bob/dev/projects/acorn-sdr/glade/acorn_main_v02.glade',
        'path.ice': '/home/bob/dev/projects/acorn-sdr/conf/ice',
        'path.iceconfig': '/home/bob/dev/projects/acorn-sdr/conf/ice/acorn_ice.config',
        'path.ozyfw': '/home/bob/dev/projects/acorn-sdr/ozy/init.sh',
        'path.DEFAULT_GUI': '/console/app_main_gui.py',
        'path.DEFAULT_TX_GUI': '/console/app_tx_gui.py',
        'path.DEFAULT_DISPLAY': '/displays/display_service.py',
        'path.DEFAULT_TX_DISPLAY': '/displays/display_service.py',
    },
    'SDR1K/PyDSP - Local':
    {
        'version' : 0,
        'description': 'Standard local profile for SDR1K using Jack and ALSA with PyDSP.',
        'type' : 'SDR1K',
        'capability': 'cap#2',
        # Note, no spaces in process list
        'processes': 'JACK_OUT,PY_DSP,JACK_IN,HW_CONT,DEFAULT_GUI',
        'path.glade': '/home/bob/dev/projects/acorn-sdr/glade/acorn_main_v02.glade',
        'path.ice': '/home/bob/dev/projects/acorn-sdr/conf/ice',
        'path.iceconfig': '/home/bob/dev/projects/acorn-sdr/conf/ice/acorn_ice.config',
        'path.JACK_OUT': '/outstr/outstr_service.py',
        'path.PY_DSP': '/dsp/dsp_service.py',
        'path.JACK_IN': '/instr/instr_service.py',
        'path.HW_CONT': '/controller/hw_service.py',
        'path.DEFAULT_GUI': '/console/app_main_gui.py',
        'window.x': 0,
        'window.y': 0,
        'window.width': 411,
        'window.height': 267,
        'audio.rate': 48000,
        'audio.frames': 512,
        'audio.output': 'soundcard',
        'audio.outputfixed': True,
        'jack.load': True,
        'jack.periods': 4,
        'jack.indevch1': 'system:capture_1',
        'jack.indevch2': 'system:capture_2',
        'jack.outdevch1': 'system:playback_1',
        'jack.outdevch2': 'system:playback_2',
        'sdr1k.rfe': False,
        'sdr1k.pa': False,
        'sdr1k.usb': False,
        'sdr1k.ppaddr': 888,
        'dsp.agcramp': 44.0, 
        'dsp.agcgain': 1000.0,
        'dsp.agcroof': 1000.0,
    },
    'SDR1K/DttSp - Local':
    {
        'version' : 0,
        'description': 'Standard local profile for SDR1K using Jack and ALSA with DttSp.',
        'type' : 'SDR1K',
        'capability': 'cap#3',
        # Note, no spaces in process list
        'processes': 'JACK_OUT,PY_DSP,JACK_IN,HW_CONT,DEFAULT_GUI',
        'path.glade': '/home/bob/dev/projects/acorn-sdr/glade/acorn_main_v02.glade',
        'path.ice': '/home/bob/dev/projects/acorn-sdr/conf/ice',
        'path.iceconfig': '/home/bob/dev/projects/acorn-sdr/conf/ice/acorn_ice.config',
        'path.JACK_OUT': '/outstr/outstr_service.py',
        'path.PY_DSP': '/dsp/dttsp_service.py',
        'path.JACK_IN': '/instr/instr_service.py',
        'path.HW_CONT': '/controller/hw_service.py',
        'path.DEFAULT_GUI': '/console/app_main_gui.py',
        'window.x': 0,
        'window.y': 0,
        'window.width': 411,
        'window.height': 267,
        'audio.rate': 48000,
        'audio.frames': 512,
        'audio.output': 'soundcard',
        'audio.outputfixed': True,
        'jack.load': True,
        'jack.periods': 4,
        'jack.indevch1': 'system:capture_1',
        'jack.indevch2': 'system:capture_2',
        'jack.outdevch1': 'system:playback_1',
        'jack.outdevch2': 'system:playback_2',
        'sdr1k.rfe': False,
        'sdr1k.pa': False,
        'sdr1k.usb': False,
        'sdr1k.ppaddr': 888,
        'dsp.agcramp': 44.0, 
        'dsp.agcgain': 1000.0,
        'dsp.agcroof': 1000.0,
        'calib.display_level' : -40,
    },
    'SDR1K/OZY/DttSp - Local':
    {
        'version' : 0,
        'description': 'Standard local profile for SDR1K using Ozy with DttSp.',
        'type' : 'SDR1K',
        'capability': 'cap#3',
        # Note, no spaces in process list
        'processes': 'OZY,PY_DSP,HW_CONT,DEFAULT_GUI',
        'path.glade': '/home/bob/dev/projects/acorn-sdr/glade/acorn_main_v02.glade',
        'path.ice': '/home/bob/dev/projects/acorn-sdr/conf/ice',
        'path.iceconfig': '/home/bob/dev/projects/acorn-sdr/conf/ice/acorn_ice.config',
        'path.OZY': '/hpsdr/ozy_service.py',
        'path.PY_DSP': '/dsp/dttsp_service.py',
        'path.DEFAULT_GUI': '/console/app_main_gui.py',
        'path.HW_CONT': '/controller/hw_service.py',
        'window.x': 0,
        'window.y': 0,
        'window.width': 411,
        'window.height': 267,
        'audio.rate': 48000,
        'audio.frames': 512,
        'audio.output': 'mercury',
        'audio.outputfixed': True,
        'jack.load': False,
        'hpsdr.ref': 'penelope',
        'hpsdr.src': 'penelope',
        'hpsdr.config': 'none',
        'hpsdr.mic': 'janus',
        'sdr1k.rfe': False,
        'sdr1k.pa': False,
        'sdr1k.usb': False,
        'sdr1k.ppaddr': 888,
        'calib.display_level' : -40,
    },
    'OZY/PyDSP - Local':
    {
        'version' : 0,
        'description': 'Standard local profile for HPSDR using Mercury and Penelope with PyDSP.',
        'type' : 'HPSDR',
        'capability': 'cap#1',
        # Note, no spaces in process list
        'processes': 'OZY,PY_DSP,DEFAULT_GUI',
        'path.glade': '/home/bob/dev/projects/acorn-sdr/glade/acorn_main_v02.glade',
        'path.ice': '/home/bob/dev/projects/acorn-sdr/conf/ice',
        'path.iceconfig': '/home/bob/dev/projects/acorn-sdr/conf/ice/acorn_ice.config',
        'path.OZY': '/hpsdr/ozy_service.py',
        'path.PY_DSP': '/dsp/dsp_service.py',
        'path.DEFAULT_GUI': '/console/app_main_gui.py',
        'window.x': 0,
        'window.y': 0,
        'window.width': 411,
        'window.height': 267,
        'audio.rate': 48000,
        'audio.frames': 512,
        'audio.output': 'mercury',
        'audio.outputfixed': True,
        'jack.load': False,
        'hpsdr.ref': 'penelope',
        'hpsdr.src': 'penelope',
        'hpsdr.config': 'penelope&mercury',
        'hpsdr.mic': 'penelope',
        'dsp.agcramp': 44.0, 
        'dsp.agcgain': 1000.0,
        'dsp.agcroof': 1000.0,
    },
    'OZY/Jack/PyDSP - Local/Remote':
    {
        'version' : 0,
        'description': 'Standard local/remote profile for HPSDR using Mercury and Penelope with PyDSP. A tee output is taken to the JACK_OUT process for remote audio.',
        'type' : 'HPSDR',
        'capability': 'cap#1',
        # Note, no spaces in process list
        'processes': 'JACK_OUT,OZY,PY_DSP,DEFAULT_GUI',
        'path.glade': '/home/bob/dev/projects/acorn-sdr/glade/acorn_main_v02.glade',
        'path.ice': '/home/bob/dev/projects/acorn-sdr/conf/ice',
        'path.iceconfig': '/home/bob/dev/projects/acorn-sdr/conf/ice/acorn_ice.config',
        'path.JACK_OUT': '/outstr/outstr_service.py',
        'path.OZY': '/hpsdr/ozy_service.py',
        'path.PY_DSP': '/dsp/dsp_service.py',
        'path.DEFAULT_GUI': '/console/app_main_gui.py',
        'window.x': 0,
        'window.y': 0,
        'window.width': 411,
        'window.height': 267,
        'audio.rate': 48000,
        'audio.frames': 512,
        'audio.output': 'mercury+soundcard',
        'audio.outputfixed': True,
        'jack.load': True,
        'jack.periods': 4,
        'jack.indevch1': 'system:capture_1',
        'jack.indevch2': 'system:capture_2',
        'jack.outdevch1': 'system:playback_1',
        'jack.outdevch2': 'system:playback_2',
        'hpsdr.ref': 'penelope',
        'hpsdr.src': 'penelope',
        'hpsdr.config': 'penelope&mercury',
        'hpsdr.mic': 'penelope',
        'dsp.agcramp': 44.0, 
        'dsp.agcgain': 1000.0,
        'dsp.agcroof': 1000.0,
    },
    'OZY/PyDSP (Combined) - Local':
    {
        'version' : 0,
        'description': 'Standard local profile for HPSDR using Mercury and Penelope with PyDSP. Combined process with OZY and PyDSP.',
        'type' : 'HPSDR',
        'capability': 'cap#1',
        # Note, no spaces in process list
        'processes': 'OZY+PY_DSP,DEFAULT_GUI',
        'path.glade': '/home/bob/dev/projects/acorn-sdr/glade/acorn_main_v02.glade',
        'path.ice': '/home/bob/dev/projects/acorn-sdr/conf/ice',
        'path.iceconfig': '/home/bob/dev/projects/acorn-sdr/conf/ice/acorn_ice.config',
        'path.OZY+PY_DSP': '/hpsdr_dsp/ozy_dsp_service.py',
        'path.DEFAULT_GUI': '/console/app_main_gui.py',
        'window.x': 0,
        'window.y': 0,
        'window.width': 411,
        'window.height': 267,
        'audio.rate': 48000,
        'audio.frames': 512,
        'audio.output': 'mercury',
        'audio.outputfixed': True,
        'jack.load': False,
        'hpsdr.ref': 'penelope',
        'hpsdr.src': 'penelope',
        'hpsdr.config': 'penelope&mercury',
        'hpsdr.mic': 'penelope',
        'dsp.agcramp': 44.0, 
        'dsp.agcgain': 1000.0,
        'dsp.agcroof': 1000.0,
    },
    'OZY/DttSp - Local':
    {
        'version' : 0,
        'description': 'Standard local profile for HPSDR using Mercury and Penelope with DttSp.',
        'type' : 'HPSDR',
        'capability': 'cap#3',
        # Note, no spaces in process list
        'processes': 'OZY,PY_DSP,TX_DSP,DEFAULT_GUI',
        'path.glade': '/home/bob/dev/projects/acorn-sdr/glade/acorn_main_v02.glade',
        'path.ice': '/home/bob/dev/projects/acorn-sdr/conf/ice',
        'path.iceconfig': '/home/bob/dev/projects/acorn-sdr/conf/ice/acorn_ice.config',
        'path.OZY': '/hpsdr/ozy_service.py',
        'path.PY_DSP': '/dsp/dttsp_service.py',
        'path.TX_DSP': '/dsp/dttsp_tx_service.py',
        'path.DEFAULT_GUI': '/console/app_main_gui.py',
        'path.DEFAULT_DISPLAY': '/displays/display_service.py',
        'window.x': 0,
        'window.y': 0,
        'window.width': 411,
        'window.height': 267,
        'audio.rate': 48000,
        'audio.frames': 512,
        'audio.output': 'mercury',
        'audio.outputfixed': True,
        'jack.load': False,
        'hpsdr.ref': 'penelope',
        'hpsdr.src': 'penelope',
        'hpsdr.config': 'penelope&mercury',
        'hpsdr.mic': 'penelope',
        'calib.display_level' : -40,
    },
    'Softrock 6.0/Lite 40M/ DttSp - Local':
    {
        'version' : 1,
        'description': 'Standard local profile for Softrock 6.0/6.2 Lite 40M using Jack and ALSA with DttSp.',
        'type' : 'Softrock',
        'capability': 'cap#5',
        # Note, no spaces in process list
        'processes': 'JACK_OUT,PY_DSP,JACK_IN,HW_CONT,DEFAULT_GUI',
        'path.glade': '/home/bob/dev/projects/acorn-sdr/glade/acorn_main_v02.glade',
        'path.ice': '/home/bob/dev/projects/acorn-sdr/conf/ice',
        'path.iceconfig': '/home/bob/dev/projects/acorn-sdr/conf/ice/acorn_ice.config',
        'path.JACK_OUT': '/outstr/outstr_service.py',
        'path.PY_DSP': '/dsp/dttsp_service.py',
        'path.JACK_IN': '/instr/instr_service.py',
        'path.HW_CONT': '/softrock/softrock_service.py',
        'path.DEFAULT_GUI': '/console/app_main_gui.py',
        'window.x': 0,
        'window.y': 0,
        'window.width': 411,
        'window.height': 267,
        'audio.rate': 48000,
        'audio.frames': 512,
        'audio.output': 'soundcard',
        'audio.outputfixed': True,
        'jack.load': True,
        'jack.periods': 4,
        'jack.indevch1': 'system:capture_1',
        'jack.indevch2': 'system:capture_2',
        'jack.outdevch1': 'system:playback_1',
        'jack.outdevch2': 'system:playback_2',
        'calib.display_level' : -40,
    },
    'Softrock SR 6.0/Lite 80M/ DttSp - Local':
    {
        'version' : 1,
        'description': 'Standard local profile for Softrock 6.0/6.2 Lite 40M using Jack and ALSA with DttSp.',
        'type' : 'Softrock',
        'capability': 'cap#6',
        # Note, no spaces in process list
        'processes': 'JACK_OUT,PY_DSP,JACK_IN,HW_CONT,DEFAULT_GUI',
        'path.glade': '/home/bob/dev/projects/acorn-sdr/glade/acorn_main_v02.glade',
        'path.ice': '/home/bob/dev/projects/acorn-sdr/conf/ice',
        'path.iceconfig': '/home/bob/dev/projects/acorn-sdr/conf/ice/acorn_ice.config',
        'path.JACK_OUT': '/outstr/outstr_service.py',
        'path.PY_DSP': '/dsp/dttsp_service.py',
        'path.JACK_IN': '/instr/instr_service.py',
        'path.HW_CONT': '/softrock/softrock_service.py',
        'path.DEFAULT_GUI': '/console/app_main_gui.py',
        'window.x': 0,
        'window.y': 0,
        'window.width': 411,
        'window.height': 267,
        'audio.rate': 48000,
        'audio.frames': 512,
        'audio.output': 'soundcard',
        'audio.outputfixed': True,
        'jack.load': True,
        'jack.periods': 4,
        'jack.indevch1': 'system:capture_1',
        'jack.indevch2': 'system:capture_2',
        'jack.outdevch1': 'system:playback_1',
        'jack.outdevch2': 'system:playback_2',
        'calib.display_level' : -40,
    },
    'Softrock 6.0/Lite 40M/OZY/DttSp - Local':
    {
        'version' : 0,
        'description': 'Standard local profile for Softrock 6.0/6.2 Lite 40M using OZY with DttSp.',
        'type' : 'Softrock',
        'capability': 'cap#5',
        # Note, no spaces in process list
        'processes': 'OZY,PY_DSP,DEFAULT_GUI',
        'path.glade': '/home/bob/dev/projects/acorn-sdr/glade/acorn_main_v02.glade',
        'path.ice': '/home/bob/dev/projects/acorn-sdr/conf/ice',
        'path.iceconfig': '/home/bob/dev/projects/acorn-sdr/conf/ice/acorn_ice.config',
        'path.OZY': '/hpsdr/ozy_service.py',
        'path.PY_DSP': '/dsp/dttsp_service.py',
        'path.DEFAULT_GUI': '/console/app_main_gui.py',
        'window.x': 0,
        'window.y': 0,
        'window.width': 411,
        'window.height': 267,
        'audio.rate': 48000,
        'audio.frames': 512,
        'audio.output': 'mercury',
        'audio.outputfixed': True,
        'jack.load': False,
        'hpsdr.ref': 'penelope',
        'hpsdr.src': 'penelope',
        'hpsdr.config': 'none',
        'hpsdr.mic': 'janus',
        'calib.display_level' : -40,
    },
    'Softrock 6.0/Lite 80M/OZY/DttSp - Local':
    {
        'version' : 0,
        'description': 'Standard local profile for Softrock 6.0/6.2 Lite 80M using OZY with DttSp.',
        'type' : 'Softrock',
        'capability': 'cap#6',
        # Note, no spaces in process list
        'processes': 'OZY,PY_DSP,DEFAULT_GUI',
        'path.glade': '/home/bob/dev/projects/acorn-sdr/glade/acorn_main_v02.glade',
        'path.ice': '/home/bob/dev/projects/acorn-sdr/conf/ice',
        'path.iceconfig': '/home/bob/dev/projects/acorn-sdr/conf/ice/acorn_ice.config',
        'path.OZY': '/hpsdr/ozy_service.py',
        'path.PY_DSP': '/dsp/dttsp_service.py',
        'path.DEFAULT_GUI': '/console/app_main_gui.py',
        'window.x': 0,
        'window.y': 0,
        'window.width': 411,
        'window.height': 267,
        'audio.rate': 48000,
        'audio.frames': 512,
        'audio.output': 'mercury',
        'audio.outputfixed': True,
        'jack.load': False,
        'hpsdr.ref': 'penelope',
        'hpsdr.src': 'penelope',
        'hpsdr.config': 'none',
        'hpsdr.mic': 'janus',
        'calib.display_level' : -40,
    },
}